package com.ruoyi.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class ShouhouRecord {
    private Integer id;
    @Excel(name = "机器sn码")
    private String snId;
    @Excel(name = "维修记录")
    private String maintainRecord;
    @Excel(name = "维修人")
    private String maintainMan;
    @Excel(name = "维修网点")
    private Integer maintainPoint;
    @Excel(name = "机器状态",readConverterExp = "3=已发货, 6=已入库 ")
    private Integer machineCondition;
    @Excel(name = "操作类型",readConverterExp = "1=维修, 2=翻新 ")
    private Integer operateType;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "最后操作时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date operateTime;

    // 维修表数据
    @Excel(name = "寄回快递单号")
    private String sendBackNumber;
    @Excel(name = "客户姓名")
    private String name;
    @Excel(name = "品牌")
    private String brand;
    @Excel(name = "机器尺寸")
    private Double size;
    @Excel(name = "机器型号")
    private String machineType;
    @Excel(name = "客户反馈现象")
    private String phenomenon;
    @Excel(name = "附件状况")
    private String attachStatus;
    @Excel(name = "返回地区")
    private String backLocation;
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "用户退回日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")  // 确保日期格式匹配
    private Date backDate;
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生产日期",dateFormat = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")  // 确保日期格式匹配
    private Date manuDate;
    @Excel(name = "数量")
    private Integer count;

    // 维修操作表
    @Excel(name = "机器实际故障")
    private String brokedown;
    @Excel(name = "不良原因")
    private String badReason;
    @Excel(name = "处理方法")
    private String resolveMethod;
    @Excel(name = "责任归属",readConverterExp = "1=材料, 2=物流, 3=客责, 4=制程 ")
    private Integer responsibility;
    @Excel(name = "其他配件")
    private String other;

    // 翻新表数据
    @Excel(name = "料号")
    private String materialNumber;
    @Excel(name = "配件详情")
    private String partsDetail;

    // 翻新操作表数据
    @Excel(name = "原SN值")
    private String oldSnId;
    @Excel(name = "现SN值")
    private String newSnId;
    @Excel(name = "缺料记录")
    private String shortageRecord;
    @Excel(name = "备注信息")
    private String remarkInformation;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "完成时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date finishTime;

    // 翻新仓库表数据
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "翻新时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date reconditionTime;
}